package com.esri.core.ags;

import java.io.Serializable;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class LOD implements Serializable {
    private static final long serialVersionUID = 1;
    int a;
    String b;
    double c;
    double d;

    public int getLevel() {
        return this.a;
    }

    public String getLevelValue() {
        return this.b;
    }

    public double getResolution() {
        return this.c;
    }

    public double getScale() {
        return this.d;
    }

    public void setLevel(int i) {
        this.a = i;
    }

    public void setResolution(double d) {
        this.c = d;
    }

    public void setScale(double d) {
        this.d = d;
    }

    public static LOD fromJson(JsonParser jsonParser) throws Exception {
        if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
            return null;
        }
        LOD lod = new LOD();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("level".equals(currentName)) {
                lod.a = jsonParser.getIntValue();
            } else if ("levelValue".equals(currentName)) {
                lod.b = jsonParser.getText();
            } else if ("resolution".equals(currentName)) {
                lod.c = jsonParser.getDoubleValue();
            } else if ("scale".equals(currentName)) {
                lod.d = jsonParser.getDoubleValue();
            } else {
                jsonParser.skipChildren();
            }
        }
        return lod;
    }

    public String toString() {
        return "LOD [level=" + this.a + ", resolution=" + this.c + ", scale=" + this.d + "]";
    }

    public int hashCode() {
        long doubleToLongBits = Double.doubleToLongBits(this.c);
        long doubleToLongBits2 = Double.doubleToLongBits(this.d);
        return ((((this.a + 31) * 31) + ((int) (doubleToLongBits ^ (doubleToLongBits >>> 32)))) * 31) + ((int) (doubleToLongBits2 ^ (doubleToLongBits2 >>> 32)));
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && getClass() == obj.getClass()) {
            LOD lod = (LOD) obj;
            return this.a == lod.a && Double.doubleToLongBits(this.c) == Double.doubleToLongBits(lod.c) && Double.doubleToLongBits(this.d) == Double.doubleToLongBits(lod.d);
        }
        return false;
    }
}
